package com.kayt.cyberBar.cuser.business.entity.po;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.codehaus.jackson.annotate.JsonBackReference;

/**
 * BOrganizationDepartUser entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "b_organization_depart_user")
public class BOrganizationDepartUser implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = -6311446026405376276L;
	private Long id;
	private String userCode;
	private String createTime;
	private String storeDepartCode;
	private String departUserCode;
	private String updateTime;
	private String statusCode;
	private String departCode;
	private BOrganizationStoreDepart bOrganizationStoreDepart;
	// Constructors

	/** default constructor */
	public BOrganizationDepartUser() {
	}

	/** full constructor */
	public BOrganizationDepartUser(String departUserCode, String userCode,
			String createTime, String updateTime,
			String statusCode) {
		this.createTime = createTime;
		this.updateTime = updateTime;
		this.statusCode = statusCode;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "ID", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "CREATE_TIME", length = 64)
	public String getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	@Column(name = "UPDATE_TIME", length = 64)
	public String getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(String updateTime) {
		this.updateTime = updateTime;
	}

	@Column(name = "STATUS_CODE", length = 64)
	public String getStatusCode() {
		return this.statusCode;
	}

	public void setStatusCode(String statusCode) {
		this.statusCode = statusCode;
	}

	
	@Column(name = "DEPART_CODE", length = 64)
	public String getDepartCode() {
		return departCode;
	}

	public void setDepartCode(String departCode) {
		this.departCode = departCode;
	}

	@ManyToOne
	@JoinColumn(name="STORE_DEPART_CODE",referencedColumnName="STORE_DEPART_CODE",insertable=false,updatable=false)
	public BOrganizationStoreDepart getbOrganizationStoreDepart() {
		return bOrganizationStoreDepart;
	}

	public void setbOrganizationStoreDepart(BOrganizationStoreDepart bOrganizationStoreDepart) {
		this.bOrganizationStoreDepart = bOrganizationStoreDepart;
	}
	
	@Column(name = "USER_CODE", length = 64)
	public String getUserCode() {
		return userCode;
	}

	public void setUserCode(String userCode) {
		this.userCode = userCode;
	}

	@Column(name = "STORE_DEPART_CODE", length = 64)
	public String getStoreDepartCode() {
		return storeDepartCode;
	}

	public void setStoreDepartCode(String storeDepartCode) {
		this.storeDepartCode = storeDepartCode;
	}
	@Column(name = "DEPART_USER_CODE", length = 64)
	public String getDepartUserCode() {
		return departUserCode;
	}

	public void setDepartUserCode(String departUserCode) {
		this.departUserCode = departUserCode;
	}
	
}